// Copyright 2024 Administrator
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

import { Artist } from "@/api/artist";
import { Song } from "@/api/song/type";
import { UploadFile } from "element-plus";
import { RateFileInfo } from "../song/types";

// Generated by https://quicktype.io

//专辑类型
export interface TrackVO {
  //专辑唯一代码（P10004217236）
  trackAssetCode: string;
  //歌手列表
  artist: Artist[];
  //发行日期
  releaseDate: string;
  //23
  cpId: number;
  //专辑介绍
  introduce: string;
  //6976364785171
  upc: string;
  //封面图
  pic: string;
  //专辑类型？
  type: number;
  //专辑标题
  title: string;
  //支付类型？
  pay_model: number;
  //专辑分类（流行）
  genre: string;
  //语言（中文）
  lang: string;
  //排行榜分数？（1.0000471）
  _score: number;
  //本站推出时间
  pushTime: string;
  //本站下架时间
  downTime: string;
  //是否可用
  available: boolean;
  //不可用时的报错信息
  availableErrMsg: string;
  //歌曲列表
  trackList: TrackList[];
  //当前用户是否喜欢
  isFavorite: number;
  //被点击喜欢的总数
  favoriteCount: number;
  //当前用户是否购买此专辑
  isPaid: number;
}

export interface TrackList {
  duration: number;
  artist: Artist[];
  assetId: string;
  isrc: string;
  sort: number;
  title: string;
  pay_model: number;
  rateFileInfo: { [key: string]: RateFileInfo };
  isFavorite: number;
  isVip: number;
  isPaid: number;
}

export interface TrackForm {
  id?: number;

  //歌单介绍
  desc: string;

  //封面图
  pic: Pic;

  //专辑标题
  title: string;
  songList?: Song[];
  //专辑中歌曲列表
  trackList: Song[];
  trackIds?: number[];
  isActive: boolean;
}

export interface TrackList {
  duration: number;
  artist: Artist[];
  assetId: string;
  isrc: string;
  sort: number;
  title: string;
  pay_model: number;
  rateFileInfo: { [key: string]: RateFileInfo };
  isFavorite: number;
  isVip: number;
  isPaid: number;
}

/**
 * 类别查询参数类型
 */
export interface TrackQuery extends PageQuery {
  trackName?: string;
}

export interface Pic extends UploadFile {
  url: string;

  id?: string;
}
